import re
import yaml
import time


fp = open("《源代码管理规范制度》.ics", "r")


# def a(s):
#     print(s)
#
#
# with open('iCalConfig.yml', 'r', encoding='utf-8') as f:
#     yml_data = f.read()
#     x = yaml.load(yml_data, Loader=yaml.FullLoader)
#     # print(type(x["BEGIN"]["CAL"]))
#     # print(x["BEGIN"]["CAL"])
#     str1 = "BEGIN:" + x["BEGIN"]["CAL"] + "\n"
#     str1 = str1 + "PRODID:" + x["PRODID"]["OUTLOOK"] + "\n"
#     print(type(str1))
#     print(str1)

#     a(x)
# print(type("\n"))


# s1 = "19:00-20:00"
#
# begin_time = s1[:s1.rfind("-")].replace(":", "")
# end_time = s1[s1.rfind("-") + 1:].replace(":", "")
# print(begin_time)
# print(end_time)
# cur_datetime = time.strftime("%Y%m%dT%H%M%SZ", time.localtime())
# print(cur_datetime)
# s2 = "4月1日"
# print(time.strftime("%m%d", time.strptime(s2, "%m月%d日")))

#
# s2 = re.findall("\d{1,2}[:]\d{1,2}[-]\d{1,2}[:]\d{1,2}", s1)
# if len(s2):
#     print(s2[0])
# else:
#     print("为空")
#
# str1 = "组织部门：人力资源部"
# substr = "："
#
# print(str1[str1.rfind(substr) + 1:])
